<?php
if (!defined('APP_ID')) { die('No direct script access allowed'); }

/**
 * Databas gate
 */
class Query {

    public static function factory($type = 'select') {
		Config::load('database');
		
		$driver = ucfirst(trim(strtolower(Config::get('driver', 'database'))));
		$type = ucfirst(trim(strtolower($type)));
		
		$class_name = 'Database_Query_' . $driver . '_' . $type;
		return new $class_name;
    }
	
}
